home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
f2c
/
may_5_92.lha
/
f2c.VMay_5_1992
/
libF77
/
pow_zz.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-07
|
312b
|
18 lines
#include "f2c.h"
VOID pow_zz(r,a,b)
doublecomplex *r, *a, *b;
{
double logr, logi, x, y;
double log(), exp(), cos(), sin(), atan2(), cabs();
logr = log( cabs(a->r, a->i) );
logi = atan2(a->i, a->r);
x = exp( logr * b->r - logi * b->i );
y = logr * b->i + logi * b->r;
r->r = x * cos(y);
r->i = x * sin(y);
}